<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateGongdanTable extends Migration
{
    public function up()
    {
        //公告
        Schema::create('gongdan', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('user_id',20)->comment('用户ID');
            $table->string('kf')->nullable()->comment('客服ID/工号');
            $table->string('title')->comment('标题');
            $table->text('content')->comment('问题内容');
            $table->text('reply')->nullable()-> comment('回复内容');
            $table->tinyInteger('status')->default(0)-> comment('处理状态 0等待处理 1已处理 2已解决');
            $table->boolean('reply_sms')->default(false)->comment('回复短信通知');
            $table->boolean('reply_email')->default(false)-> comment('回复邮件通知');
            $table->timestamps();
        });

    }

    public function down()
    {
        Schema::dropIfExists('gongdan');
    }
}
